<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <ul v-for="itemArr in arr">
        <li v-for="item in evenArr(itemArr)">{{item}}</li>
      </ul>
    </div>
    <script type="module">
      import { createApp, ref, reactive, computed } from "./vue.esm-browser.js";
      const app = createApp({
        setup() {
          const arr = ref([
            [1, 2, 3, 4, 5],
            [6, 7, 8, 9, 10],
          ]);

          const evenArr = function (arr = []) {
            return arr.filter((el) => el % 2 === 0);
          };

          return {
            arr,
            evenArr,
          };
        },
      });
      app.mount("#app"); //挂载
    </script>
  </body>
</html>
